package com.jiudengnile.liushu.biz.enums;

/**
 * topic的状态
 * @author pister
 * 2012-9-8 下午02:23:53
 */
public enum TopicStatusEnum {
	
	NOT_SUBMIT(0, "未提交"),
	PUBLISHED(1, "已发布"),
	FINISHED(2, "已完成"),
	CLOSED(3, "已关闭"),
	EXPIRED(4, "已过期"),
	CLOSED_BY_ADMIN(5, "被管理员关闭")
	;
	
	
	private TopicStatusEnum(int value, String name) {
		this.value = value;
		this.name = name;
	}

	private final int value;
	
	private final String name;
	
	public static TopicStatusEnum valueOf(int value) {
		for (TopicStatusEnum e : values()) {
			if (e.value == value) {
				return e;
			}
		}
		return null;
	}

	public int getValue() {
		return value;
	}

	public String getName() {
		return name;
	}

}
